@*
 *Author：jxx
 *Contact：283591387@qq.com
 *Date：2018-07-01
 * 此代码由框架生成，请勿随意更改
 *@
@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>

@{await Html.RenderPartialAsync("~/Views/Shared/Uploader.cshtml");}



<script>
    @{ViewBag.dropDownIds = "audit,enable,city";}
    var searchData = [[{"columnType":"string","dataSource":[],"displayType":"","text":"专家名称","require":false,"id":"ExpertName"},{"columnType":"string","dataSource":[],"displayType":"","text":"真实姓名","require":false,"id":"ReallyName"},{"columnType":"string","dataSource":[],"displayType":"","text":"身份证号","require":false,"id":"IDNumber"}],[{"columnType":"string","dataSource":[],"displayType":"text","text":"学历","require":false,"id":"Education"},{"columnType":"string","dataSource":[],"displayType":"","text":"职业","require":false,"id":"Professional"},{"columnType":"string","dataSource":[],"displayType":"无","text":"所在公司","require":false,"id":"Company"}],[{"columnType":"int","dataSource":optionConfigaudit,"displayType":"dropList","text":"审核状态","require":false,"id":"AuditStatus"},{"columnType":"string","dataSource":optionConfigcity,"displayType":"dropList","text":"服务地区","require":false,"id":"City"},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"审核时间","require":false,"id":"AuditDate"}]];
    var editData = [[{"columnType":"string","dataSource":[],"displayType":"","text":"专家名称","require":false,"id":"ExpertName","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"","text":"真实姓名","require":false,"id":"ReallyName","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"","text":"身份证号","require":false,"id":"IDNumber","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"","text":"学历","require":false,"id":"Education","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"","text":"职业","require":false,"id":"Professional","fileMaxCount":1},{"columnType":"string","dataSource":optionConfigcity,"displayType":"drop","text":"服务地区","require":false,"id":"City","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"","text":"电话","require":false,"id":"PhoneNo","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"","text":"所在公司","require":false,"id":"Company","fileMaxCount":1}],[{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":true,"id":"Enable","fileMaxCount":1},{"columnType":"datetime","dataSource":[],"displayType":"","text":"申请时间","require":false,"id":"CreateDate","fileMaxCount":1,"disabled":1}],[{"columnType":"string","dataSource":[],"displayType":"textarea","text":"擅长领域","require":false,"id":"SpecialField","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"textarea","text":"个人简介","require":false,"id":"Resume","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"file","text":"专家头像","require":false,"id":"HeadImageUrl","fileMaxCount":1}]];


    var gridParameters = {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'ExpertId',
        url: '/App_Expert/GetPageData',
        nameSpace:'',
        queryParams: {TableName:'App_Expert',sort:'ExpertId',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        fileLink:true,
        richText:false,
        hasSection:false,
        cnName:'专家信息',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:3100,totalCol:21},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'ExpertId',title:'主键ID',datatype:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'User_Id',title:'申请人帐号Id',datatype:'int',width:90,hidden:true,align:'left'},
                       {field:'UserName',title:'申请人帐号',datatype:'string',width:120,formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val,index:index})},align:'left',sortable:true},
                       {field:'UserTrueName',title:'申请人',datatype:'string',width:120,align:'left'},
                       {field:'ExpertName',title:'专家名称',datatype:'string',width:150,editor:'text',align:'left'},
                       {field:'AuditStatus',title:'审核状态',datatype:'int',width:120,formatter: function (val, row, index) {
    return dataSourceaudit.textFormatter(optionConfigaudit, val, row, index);
    },
require:true,align:'left'},
                       {field:'Auditor',title:'审核人',datatype:'string',width:150,align:'left'},
                       {field:'Enable',title:'是否启用',datatype:'byte',width:90,editor: { type: 'combobox', options: optionConfigenable },formatter: function (val, row, index) {
    return dataSourceenable.textFormatter(optionConfigenable, val, row, index);
    },
require:true,align:'left'},
                       {field:'ReallyName',title:'真实姓名',datatype:'string',width:150,editor:'text',align:'left'},
                       {field:'IDNumber',title:'身份证号',datatype:'string',width:200,editor:'text',align:'left'},
                       {field:'PhoneNo',title:'电话',datatype:'string',width:150,editor:'text',align:'left'},
                       {field:'HeadImageUrl',title:'专家头像',datatype:'string',width:220,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createImageUrl',{row:row,key:'HeadImageUrl'})},align:'left'},
                       {field:'Education',title:'学历',datatype:'string',width:120,editor:'text',align:'left'},
                       {field:'Professional',title:'职业',datatype:'string',width:120,editor:'text',align:'left'},
                       {field:'Company',title:'所在公司',datatype:'string',width:150,editor:'text',align:'left'},
                       {field:'City',title:'服务地区',datatype:'string',width:120,editor: { type: 'combobox', options: optionConfigcity },formatter: function (val, row, index) {
    return dataSourcecity.textFormatter(optionConfigcity, val, row, index);
    },
align:'left'},
                       {field:'SpecialField',title:'擅长领域',datatype:'string',width:120,editor:'text',align:'left'},
                       {field:'Resume',title:'个人简介',datatype:'string',width:220,editor:'text',align:'left'},
                       {field:' Certificate',title:'资质证书',datatype:'string',width:200,formatter:function (val, row, index) { return $.fn.layOut('createImageUrl',{row:row,key:' Certificate'})},align:'left'},
                       {field:'AuditId',title:'审核人Id',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'AuditDate',title:'审核时间',datatype:'DateTime',width:150,align:'left',sortable:true},
                       {field:'CreateID',title:'创建人Id',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',datatype:'string',width:130,hidden:true,align:'left'},
                       {field:'CreateDate',title:'申请时间',datatype:'DateTime',width:150,readonly:true,editor:'text',align:'left',sortable:true},
                       {field:'ModifyID',title:'修改人ID',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',datatype:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',datatype:'DateTime',width:150,align:'left',sortable:true}]]
    };

    var $elementGrid;
    window.onload = function () {
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>
